package main

import (
	"fmt"
	"github.com/gin-gonic/gin"
)

func main() {
	router := gin.Default()
	router.GET("/download/:fileName", func(c *gin.Context) {
		fileName := c.Param("fileName")
		c.Header("Content-Type", "application/octet-stream")
		c.Header("Content-Disposition", fmt.Sprintf("attachment; filename=%s", fileName))
		c.Header("Content-Transfer-Encoding", "binary")
		c.File(fmt.Sprintf("./src/03_gin/08_file_upload/multiUpload/%s", fileName))
	})
	router.Run(":8080")
}
